Skip to content

Conversation

CodeVoyager007
Copy link

Resolves #1376: Bidirectional Handoff System

This PR implements a bidirectional handoff system for orchestrator-style workflows, allowing sub-agents to return control to their parent agent. Key features:

  • AgentRegistry and AgentRunner for scalable agent/workflow management
  • return_to_parent_handoff and create_bidirectional_handoff_workflow for flexible workflows
  • Parallel task execution via run_parallel
  • Convenience functions (create_financial_workflow_registry, create_support_workflow_registry)
  • Comprehensive test suites in tests/test_bidirectional_handoffs.py and tests/test_registry_handoffs.py
  • Documentation in docs/bidirectional_handoffs.md, with updates to docs/index.md, and README.md

Testing

  • All tests pass (pytest tests/test_bidirectional_handoffs.py tests/test_registry_handoffs.py -v)
  • Covers edge cases (missing agents, circular references, parallel execution)

Checklist

  • Code follows SDK conventions
  • Tests cover all new functionality
  • Documentation updated
  • Backward compatible with existing handoffs

Please review and let me know if any changes are needed

@CodeVoyager007 CodeVoyager007 marked this pull request as draft August 8, 2025 14:09
@CodeVoyager007 CodeVoyager007 marked this pull request as ready for review August 9, 2025 15:01
@CodeVoyager007 CodeVoyager007 marked this pull request as draft August 9, 2025 15:01
@seratch seratch added the enhancement New feature or request label Aug 11, 2025
@seratch
Copy link
Member

seratch commented Aug 11, 2025

Thanks for sending this. We're not planning to add this mechanism in the short term, but sharing your work with communities and knowing what people think would be beneficial for us too.

@seratch
Copy link
Member

seratch commented Aug 15, 2025

Since we don't have plans to merge this, let me close this one now. Thanks again for your interest!

@seratch seratch closed this Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proposal: Return results to the parent Agent
2 participants